package com.vhall.component.controller.tag.facade;

import com.vhall.component.entity.tag.TagEntity;
import com.vhall.component.entity.tag.vo.*;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author guoxin.wang
 * @date 2021/7/5 10:35
 */
@FeignClient(value = "TagConsoleFacade", path = "/v4/tag/console")
public interface TagConsoleFacade {

    /**
     * 保存
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/save-tag")
    TagEntity save(@Validated TagCreateVO reqVO);


    /**
     * 列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/list")
    TagPage<TagEntityVO> list(@Validated TagListVO reqVO);

    /**
     * 更新
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/edit")
    Integer update(@Validated TagUpdateVO reqVO);

    /**
     * 删除
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/delete")
    Integer delete(@Validated TagDeleteVO reqVO);

    /**
     * 详情
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/info")
    List<TagEntity> info(@Validated TagInfoVO reqVO);

    /**
     * 排序
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/order")
    Boolean order(@Validated TagOrderVO reqVO);

    /**
     * 排序
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/lable-delete")
    Integer labelDelete(@Validated TagDeleteVO reqVO);

    /**
     * add count
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/count")
    Boolean count(@Validated TagCountVO reqVO);

    /**
     * 开启/禁用标签
     * @param vo
     * @return
     */
    @TokenAuth
    @PostMapping("/enable-tag")
    Boolean enableTag(@Validated EnableTagRequestVO vo);
}
